Manoeuvring simulations¶
Many simulation model for ship manoeuvring have been developed in the field of ship hydrodynamics such as: the Abkowitz model [Abk64] or the Norrbin model [Nor60]. This chapter will develop a general simulation model for ship manoeuvring, that can be further specified to become either the Abkowitz or Norbin model. Expressing the models on a general form is important in this research where many different models will be tested and compared.
The models can be expressed in a very general way as shown in eq_6DOF ( [Fos21]).
Where \(\eta\) describes the position and \(\nu\) is the velocities:
The model matrixes:
\(M\) : inertia
\(C\) : corriolis/centrepetal
\(D\) : damping
\(g(\eta)\) is a vector of generalized gravitational an buoyance forces.
\(g_0\) is static restoring forces due to ballast systems.
The inertia as well as the corriolis matrix can be split into actual mass/intertia and added mass/inertia:
So that the model equation can be written as:
The velocity of the current can be described as (assumed to be irrotational):
So that \(\nu_r\) are the relative velocities (including current):
If the current is also assumed to be constant, acceleration of the relative velocities is the same:
So that the entire equation can be expressed in terms of relative velocities:
Ship parameters¶
The Ocean Bird Wind Powered Car Carrier will be used as the reference ship of this book:

A model scale version of this ship has the following main dimensions:
{'T': 0.2063106796116504,
'L': 5.014563106796117,
'CB': 0.45034232324249973,
'B': 0.9466019417475728,
'rho': 1000,
'x_G': 0,
'm': 441.0267843660858,
'I_z': 693.124396594905,
'volume': 0.4410267843660858}
3 DOF¶
A simulation model with only three degrees of fredom (DOF) : surge, sway and yaw is often sufficient to describe the ship’s manoeuvring performance. The equation of motion can be expressed as (Triantafyllou & Hover, 2003):
Where \(X_{force}\), \(Y_{force}\) and \(N_{force}\) are the hydrodynamic forces from the ship. So these equations holds for most of the different models for manoeuvring, except linear models where the nonlinear \(r\cdot u\) term have been linearized. The difference in the methods is rather in how these hydrodynamic forces are calculated.
The hydrodynamic forces can be split into added masses (that depend on the accelerations: \(\dot{u}\), \(\dot{v}\), \(\dot{r}\)) and dampings (that depend on the velocities: \(u\), \(v\), \(r\)):
\(X_{\dot{u}}\), \(X_{\dot{v}}\), \(X_{\dot{r}}\) are the added masses: when the ship is accelerating in water, not only the mass of the ship is accelerating, but also some mass in the water needs to be accelerated. This is referred to as added masses. Sometimes added masses such as \(X_{\dot{v}}\) is neglected, as in the case above.
The specialization of the various simulation models can now be further categorized to the functions to calculate the damping forces: \(X_{D}\), \(Y_{D}\), \(N_{D}\).
The general equation for all of the simulation models in this research can be written as:
The classic simulation methods express the damping forces as a truncated taylor series. Here is a rather simple model, that has been created by the author to be used in the followin examples.
Similitude¶
Prime system¶
The prime system uses ship length \(L\), water density \(\rho\) and total velocity \(U^2=u^2+v^2\) to express physical quantities in nondimensional form. The quantities have a prime symbol (‘) attached to them when the prime system is used. The quantities are made nondimensional with the prime system by dividing with a denominator according to the table below:
| denominator | |
|---|---|
| length | L |
| volume | L**3 |
| mass | 0.5*L**3*rho |
| density | 0.5*rho |
| inertia_moment | 0.5*L**5*rho |
| time | L/U |
| area | L**2 |
| angle | 1 |
| - | 1 |
| linear_velocity | U |
| angular_velocity | U/L |
| linear_acceleration | U**2/L |
| angular_acceleration | U**2/L**2 |
| force | 0.5*L**2*U**2*rho |
| moment | 0.5*L**3*U**2*rho |
The manoeuvring models are often expressed in the prime system so that a nondimensional force \(F'\) for instance can be expressed as a function of some coefficients \(C\) and nondimensional velocity \(v\):
This may look as a model where the force depend on the transverse velocity \(v\) only, but this is actually not true. If this equation is converted converted back to SI units it is instead written:
So it is now clear that the example force model above, also depends on the total velocity \(U\).
Brix parameters¶
The hydrodynamic derivatives can be estimated with semi empirical formulas according to (Brix, 1993).
The figure above shows the quasi static forces for the present ship with the hydrodynamic derivatives during a variation of rudder angle \(\delta\),
yaw rate \(r\) and tranverse velocity \(v\) and total velocity \(U\)=2 m/s
Simulation¶
Decoupling¶
There is a coupling between the sway and yaw equation thruogh the added masses. These equations need to be decoupled to be usable in a simulation model. This is done by first expressing the equation in matrix form:
The decoupled equations are obtained by inverting the intertia matrix:
This equation can be written in a cleaner way if the \(S\) term is introduced:
Where \(S\) is a helper variable defined as:
prime and SI¶
This concise expression to calculate the accelerations is expressed in the prime system. Conducting a simulation by integrating this expression will give a simulation that is conducted in the prime system, with prime system time etc., which is not very convenient. If a simulation should instead be conducted with a standard unit system (SI), the states (velocities as well as the resulting accelerations) and the ship parameters (length, masses and inertia) need to be converted.
The input velocities in SI should be converted to prime and the output accelerations in prime needs to be converted back to SI:
Input: velocities : SI -> prime
Output: accelerations : prime -> SI
This can be done for each time step in the simulations, by implementing this logic into the code. Another alternative is to rewrite the expression into SI units, which will be done below. The damping functions: \(X_D(u,v,r,\delta)\), \(Y_D(u,v,r,\delta)\), \(N_D(u,v,r,\delta)\) is also substituted with their polynomials to derive the full expression.
u1d_function = sp.Function(r'\dot{u}')(u,v,r,delta)
v1d_function = sp.Function(r'\dot{v}')(u,v,r,delta)
r_function = sp.Function(r'\dot{r}')(u,v,r,delta)
subs_prime = [
(m,m/prime_system.df_prime.mass.denominator),
(I_z,I_z/prime_system.df_prime.inertia_moment.denominator),
(x_G,x_G/prime_system.df_prime.length.denominator),
(u, u/sp.sqrt(u**2+v**2)),
(v, v/sp.sqrt(u**2+v**2)),
(r, r/(sp.sqrt(u**2+v**2)/L)),
]
subs = [
(X_D, vmm.X_qs_eq.rhs),
(Y_D, vmm.Y_qs_eq.rhs),
(N_D, vmm.N_qs_eq.rhs),
]
subs = subs + subs_prime
A_SI = A.subs(subs)
b_SI = b.subs(subs)
x_dot = sympy.matrices.dense.matrix_multiply_elementwise(A_SI.inv()*b_SI,
sp.Matrix([(u**2+v**2)/L,(u**2+v**2)/L,(u**2+v**2)/(L**2)]))
sp.Eq(sp.UnevaluatedExpr(sp.Matrix([
u1d_function,
v1d_function,
r_function,
])),sp.UnevaluatedExpr(x_dot))
…so the expanded expression in SI units is a lot more complicated.
Simulate data¶
Where the state vector \(\vec{x}\):
The actual simulation can be carried out with a simple Euler forward integration:
def time_step(x_,u_):
psi=x_[2]
u=x_[3]
v=x_[4]
r=x_[5]
delta = u_
x_dot = run(lambda_f, **parameters, **ship_parameters, psi=psi, u=u, v=v, r=r, delta=delta).flatten()
return x_dot
def simulate(x0,E, ws, t, us):
simdata = np.zeros((6,len(t)))
x_=x0
for i,(u_,w_) in enumerate(zip(us,ws)):
x_dot = time_step(x_,u_)
x_=x_ + h_*x_dot
simdata[:,i] = x_
df = pd.DataFrame(simdata.T, columns=["x0","y0","psi","u","v","r"], index=t)
df.index.name = 'time'
df['delta'] = us
return df
parameters=df_parameters['prime'].copy()
N_ = 1000
t_ = np.linspace(0,50,N_)
h_ = float(t_[1]-t_[0])
ws = np.zeros(N_)
us = delta_ = np.deg2rad(20)*np.ones(N_)
x0_ = np.array([0,0,0,2,0,0])
E=np.array([0,0,0,1,1,1])
df = simulate(x0=x0_, E=E, ws=ws, t=t_, us=us)
df['beta'] = -np.arctan2(df['v'],df['u'])
df['U'] = np.sqrt(df['u']**2 + df['v']**2)
df.to_csv('first_simulation.csv', index=True)
Simulate parameter contributions¶
Here is an interavtive graph showing how the various hydrodynamic derivatives contribute to the forces: